<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class frame_tire_delete extends Page
{
       function frame_tire_deleteCreate($sender, $params)
       {
       $search = $_GET['search'];
       $tire_id  = $_GET['tire_id'];

       $delete_query = "DELETE FROM tire_inventory_tbl WHERE tire_id='".$tire_id."'";
       mysql_query($delete_query) or die("DELETE ".mysql_error());

       redirect("frame_tire_list.php?search=".$search);
       }

}

global $application;

global $frame_tire_delete;

//Creates the form
$frame_tire_delete=new frame_tire_delete($application);

//Read from resource file
$frame_tire_delete->loadResource(__FILE__);

//Shows the form
$frame_tire_delete->show();

?>